<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Order_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input data-field="order_no" id="c-order_id" min="0" data-rule="required" data-source="statistics/order/index" class="form-control selectpage" name="row[order_id]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Order_detail_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input data-field="trademark_printing" id="c-order_detail_id" data-rule="required" min="0" data-source="statistics/orderdetail/index" class="form-control selectpage" name="row[order_detail_id]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Employee_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-employee_id" data-rule="required" min="0" data-source="other/employee/index" class="form-control selectpage" name="row[employee_id]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Material_plan_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-material_plan_id" data-rule="required" data-source="statistics/materialplan/index" class="form-control selectpage" name="row[material_plan_id]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Quantity')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-quantity" min="0" class="form-control" name="row[quantity]" type="number">
        </div>
    </div>
    <div class="form-group row">
        <label class="control-label col-xs-12 col-sm-2">{:__('物料详情')}:</label>
        <div class="col-xs-12 col-sm-8">
            <dl class="fieldlist" data-template="basictpl" data-name="row[materiallist]">
                <dd>
                    <ins>{:__('原料id')}</ins>
                    <ins>{:__('色号id')}</ins>
                    <ins>{:__('重量')}</ins>
                </dd>
                <dd><a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> {:__('Append')}</a></dd>
                <!--请注意 dd和textarea间不能存在其它任何元素，实际开发中textarea应该添加个hidden进行隐藏-->
                <textarea name="row[materiallist]" class="form-control" cols="30" rows="5"></textarea>
            </dl>
            <script id="basictpl" type="text/html">
                <dd class="form-inline">
                    <ins><input type="text" name="<%=name%>[<%=index%>][material_id]" class="form-control" value="<%=row.material_id%>" placeholder="标题" size="10"/></ins>
                    <ins><input type="text" name="<%=name%>[<%=index%>][material_colour_id]" class="form-control" value="<%=row.material_colour_id%>" placeholder="描述"/></ins>
                    <ins><input type="text" name="<%=name%>[<%=index%>][weight]" class="form-control" value="<%=row.weight%>" placeholder="大小"/></ins>
                    <!--下面的两个按钮务必保留-->
                    <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
                    <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
                </dd>
            </script>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <div class="radio">
            {foreach name="statusList" item="vo"}
            <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="0"}checked{/in} /> {$vo}</label> 
            {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
